﻿using T4UtilityBelt.Writers;

namespace T4UtilityBelt.UxDesigns.Controls.Renderers.Windows
{
    public class LabelRenderer : ControlRenderer<LabelControl, ILabelRenderer>, ILabelRenderer
    {
        protected override void OnRenderUiXmlBegin(LabelControl control, CodeWriter writer)
        {
            writer.WriteBeginTag("TextBlock");

            RenderControlAttributes(control, writer);

            writer.AddBinding("Text", control.Text);

            writer.WriteFullEnd();
        }
    }
}